package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.entity.sys.SysMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysMenuMapper {
    List<SysMenu> selectAll();

    void deleteById(Long id);

    void save(@Param("sysMenu") SysMenu sysMenu);

    SysMenu selectById(Long id);

    void update(@Param("sysMenu") SysMenu sysMenu);

    boolean hasChildren(Long id);

    List<Long> selectMenuIdsByRoleId(Long roleId);

    List<SysMenu> listMenusByUserId(Long userId);
}
